﻿using System.Web.Mvc;
using SenileCoderMvc.Library.DataAccess;

namespace SenileCoderMvc.Controllers
{
    public class HomeController : Controller
    {
        private readonly ISupportsDataAccess supportsDataAccess;

        public HomeController(ISupportsDataAccess supportsDataAccess)
        {
            this.supportsDataAccess = supportsDataAccess;
        }

        //
        // GET: /Home/

        public ActionResult Index()
        {
            var list = supportsDataAccess.GetObjects();
            return View(list);
        }

    }
}
